package com.yehun.config;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * 获取当前数据源, mybatis使用
 */
public class MybatisDataSource extends AbstractRoutingDataSource {

    @Override
    protected Object determineCurrentLookupKey() {
        return MybatisDataSourceSwitch.get();
    }

}